{include file="../../../application/admin/view/public/head" /}
<div>

    

    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form"  method="post" action="{:url('index')}">
                <div class="layui-form-item">
                    <div class="layui-form-item layui-inline">
                        <input type="text" autocomplete="off" placeholder="{:lang('wd')}" class="layui-input" name="wd" value="{$param['wd']}">
                    </div>
                    
                    <div class="layui-form-item layui-inline">
                        <button class="pear-btn pear-btn-md pear-btn-primary j-search">
                            <i class="layui-icon layui-icon-search"></i>
                            {:lang('btn_search')}
                    </div>
                </div>
            </form>
        </div>
    </div>


    <div class="layui-card">
        <div class="layui-card-body">
          <table id="role-table" lay-filter="role-table"></table>
          <div
            class="layui-form layui-border-box layui-table-view"
            lay-filter="LAY-table-1"
            lay-id="role-table"
            style=""
          >
            <div class="layui-table-tool">
              <div class="layui-table-tool-temp">
                <a data-href="{:url('info')}" class="pear-btn pear-btn-primary pear-btn-md j-iframe"><i class="layui-icon">&#xe654;</i>{:lang('add')}</a>
                <a data-href="{:url('batch')}" class="pear-btn pear-btn-primary pear-btn-md j-page-btns confirm"><i class="layui-icon">&#xe642;</i>{:lang('edit')}</a>
                <a data-href="{:url('del')}" class="pear-btn pear-btn-danger pear-btn-md j-page-btns confirm"><i class="layui-icon">&#xe640;</i>{:lang('del')}</a>
           
              </div>
            </div>
            <div class="layui-table-box">
              <div class="layui-table-header">
				<form class="layui-form" method="post" id="pageListForm" >
					<table
					cellspacing="0"
					cellpadding="0"
					border="0"
					class="layui-table"
					lay-skin="line"
					>
					<thead>
                        <tr>
                            <th width="25"><input type="checkbox" lay-skin="primary" lay-filter="allChoose"></th>
                            <th width="100">{:lang('id')}</th>
                            <th width="100">{:lang('sort')}</th>
                            <th width="150">{:lang('genre')}</th>
                            <th >{:lang('name')}</th>
                            <th >{:lang('url')}</th>
                            <th >{:lang('logo')}</th>
                            <th width="160">{:lang('opt')}</th>
                        </tr>
					</thead>
					<tbody>
						{volist name="list" id="vo"}
            <tr>
                <td><input type="checkbox" name="ids[]" value="{$vo.link_id}" class="layui-checkbox checkbox-ids" lay-skin="primary"></td>
                <td>{$vo.link_id}</td>
                <td><input type="input" name="link_sort[]" value="{$vo.link_sort}" class="layui-input"></td>
                <td>
                    <select name="link_type[]">
                        <option value="0" {if condition="$vo['link_type'] eq 0"}selected {/if}>{:lang('admin/link/text_link')}</option>
                        <option value="1" {if condition="$vo['link_type'] eq 1"}selected {/if}>{:lang('admin/link/pic_link')}</option>
                    </select>
                </td>
                <td><input type="input" name="link_name[]" value="{$vo.link_name}" class="layui-input"></td>
                <td><input type="input" name="link_url[]" value="{$vo.link_url}" class="layui-input"></td>
                <td><input type="input" name="link_logo[]" value="{$vo.link_logo}" class="layui-input"></td>
                <td>
                    <a class="pear-btn pear-btn-primary pear-btn-sm j-ajax" data-href="{:url('index/check_back_link')}?url={$vo['link_url']}" refresh="no" href="javascript:;" title="{:lang('detect')}">{:lang('detect')}</a>
                    <a class="pear-btn pear-btn-primary pear-btn-sm j-iframe" data-href="{:url('info?id='.$vo['link_id'])}" href="javascript:;" title="{:lang('edit')}">{:lang('edit')}</a>
                    <a class="pear-btn pear-btn-danger pear-btn-sm j-tr-del" data-href="{:url('del?ids='.$vo['link_id'])}" href="javascript:;" title="{:lang('del')}">{:lang('del')}</a>
                </td>
            </tr>
            {/volist}
					</tbody>
					</table>
				</form>
              </div>
              
            </div>
            
            
          </div>
        </div>
      </div>

    
    <div id="pages" class="center"></div>
</div>
{include file="../../../application/admin/view/public/foot" /}


<script type="text/javascript">
    var curUrl="{:url('link/index',$param)}";
    layui.use(['laypage', 'layer'], function() {
        var laypage = layui.laypage
                , layer = layui.layer;

        laypage.render({
            elem: 'pages'
            ,count: {$total}
            ,limit: {$limit}
            ,curr: {$page}
            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
            ,jump: function(obj,first){
                if(!first){
                    location.href = curUrl.replace('%7Bpage%7D',obj.curr).replace('%7Blimit%7D',obj.limit);
                }
            }
        });
    });

</script>
</body>
</html>